{include file="include/headerFile" /}
{include file="include/header" /}
<link rel="stylesheet" href="/static/css/search.css">
<section>
    <div class="bannerswiper"></div>
</section>
<main class="">
    <section>
        <div class="fenye-banner-noimg">
        </div>
    </section>
    <section class="search-modle">
        <div class="w1400">
            <div class="search-content">
                <h2 class="common-h2">
                    Search Results
                </h2>
                <div class="inupt-box">
                    <input class="s-input input search-keywords" name="keywords" type="text" value="{$keywords}"
                           placeholder="Please enter keywords">
                    <div class="icon-btn search-btn1 search-btn"></div>
                </div>

                <p class="result-text">
                    Searched“ <span class="keyword">{$keywords}</span> ”Keywords have the following content
                </p>
                <div class="classify-tab">
                    <div class="item on">Product</div>
                    <div class="item">News</div>
                </div>
                <div class="result-list">
                    <!-- 产品列表 -->
                    <div class="box on">
                        {volist name="proList" id="vo"}
                        <a href="/{$vo.rewrite_url}.html" class="info-box">
                            <div class="left">
                                <div class="img"><img src="{$vo.photo}" alt="{$vo.name}"></div>
                                <h3 class="tit">{:strip_tags($vo.name)}</h3>
                            </div>
                            <p class="more">Product Details</p>
                        </a>
                        {/volist}

                    </div>
                    <!-- 咨讯列表 -->
                    <div class="box">
                        {volist name="cmsList" id="vo"}
                        <a href="/{$vo.rewrite_url}.html" class="info-box">
                            <div class="left">
                                <h3 class="tit">{$vo.title}</h3>
                            </div>
                            <p class="more">News Details</p>
                        </a>
                        {/volist}
                    </div>
                </div>
            </div>
        </div>

    </section>
</main>

{include file="include/footer" /}
{include file="include/footerFile" /}

<script>
    $('.classify-tab .item').click(function () {
        $(this).addClass('on').siblings().removeClass('on');
        $('.result-list .box').eq($(this).index()).addClass('on').siblings().removeClass('on');
    })


    $('.search-btn').click(() => {
        $keywords = $(".search-keywords").val();
        if ($keywords) {
            location.href = '/search?keywords=' + $keywords;
        } else {
            alert('请输入关键词');
        }

    })

</script>
</body>

</html>